<!DOCTYPE html>
<html>
<head>
    <title>保单信息</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-2">
                <select class="form-control" v-model="q.insure">
                    <option v-for="l in insures" :value="l.id">{{l.name}}</option>
                </select>
            </div>
            <a class="btn btn-default" @click="query">查询</a>
            <a class="btn btn-primary" @click="info"><i class="fa fa-info"></i>&nbsp;详情</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-success">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">险种</div>
                <div class="col-sm-10">
                    <select class="form-control" :disabled="showInfo" v-model="ord.insure">
                        <option v-for="l in insures" :value="l.id">{{l.name}}</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">价格</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" :disabled="showInfo" v-model="ord.price" placeholder="价格"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">备注</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" :disabled="showInfo" v-model="ord.remark" placeholder="备注"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">代理人</div>
                <div class="col-sm-10">
                    <select class="form-control" :disabled="showInfo" v-model="ord.user">
                        <option v-for="l in users" :value="l.userId">{{l.username}}</option>
                    </select>
                </div>
            </div>

            <div class="form-group" v-if="showInfo">
                <div class="col-sm-2 control-label">添加时间</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" :disabled="showInfo" v-model="ord.gmttime"
                           placeholder="添加时间"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定" v-if="!showInfo"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${rc.contextPath}/js/admin/ord3.js?_${date.systemTime}"></script>
</body>
</html>